import torch
import torch.nn as nn
import torch.nn.functional as F
# Define the Cultural Embedding Transmission Network (CETNet)
class CETNet(nn.Module):
def __init__(self, input_dim, hidden_dim, output_dim):
super(CETNet, self).__init__()
# Define layers for encoding the motif and cultural memory
self.encoder = nn.LSTM(input_dim, hidden_dim, batch_first=True)
self.memory_embedding = nn.Linear(hidden_dim, hidden_dim) # Cultural memory upd
# models/structural_attention.py
from __future__ import annotations
from typing import Optional, Tuple
import torch
from torch import nn, Tensor
import torch.nn.functional as F
class StructuralAttentionConv(nn.Module):
r"""
Structural Attention message passing (single head) inspired by the paper's
formulations (attention over neighbors with separate W1/W2 and vector 'a').​:contentReference[oaicite:3]{index=3}
For a directed graph G=(V,E), we compute for edge u->v:
import torch
import torch.nn as nn
import torch.nn.functional as F
class MultiModalAttention(nn.Module):
def __init__(self, input_dims, attention_dims):
super(MultiModalAttention, self).__init__()
self.attention_layers = nn.ModuleList([
nn.Linear(input_dim, attention_dims) for input_dim in input_dims
])
self.attention_weights = nn.Parameter(torch.ones(len(input_dims)))
def forward(self, inputs):
attention_scores
### Commands / Description
Command | Description
---------|-----------
**Search** |
`/{earch_term}` | searches for `{search_term}` in the document
`?{search_term}` } | searches for `{search_term}` in the document
`CNTRL - D` | resets the cursor
**Substitute** | place cursor on the line
`:s/old/new/g` | every instance of `old` replaced with `new` if `g` or global is used
`:%s/old/new/gc` | `gc` means with prompt, search and replace WHILE typing
**Execute Terminal Commands** |
`:!{terminal comma
# models/hape.py
from __future__ import annotations
import math
from typing import Optional, Tuple, Dict
import torch
from torch import nn, Tensor
import torch.nn.functional as F
class SinusoidalPositionalEncoding(nn.Module):
"""
Classic transformer-style fixed positional encoding.
Args:
dim: feature dimension
max_len: maximum sequence length supported
"""
def __init__(self, dim: int, max_len: int = 10_000):
super().__init__()
pe = torch.z
DECLARE
v_total_pkg NUMBER := 0;
v_success_pkg NUMBER := 0;
v_error_pkg NUMBER := 0;
v_total_prc NUMBER := 0;
v_success_prc NUMBER := 0;
v_error_prc NUMBER := 0;
v_total_fnc NUMBER := 0;
v_success_fnc NUMBER := 0;
v_error_fnc NUMBER := 0;
v_total_trg NUMBER := 0;
v_success_trg NUMBER := 0;
v_error_trg NUMBER := 0;
BEGIN
-- PACKAGES
FOR pkg IN (SELECT DISTINCT object_name FROM user_objects WHERE object
# shareX audio recording parameters

<form id="purchase-form">
<label>
個数(最大2個まで):
<input type="number" id="quantity" name="quantity" min="1" max="2" required />
</label>
<button type="submit">購入</button>
</form>
<script>
document.getElementById("purchase-form").addEventListener("submit", async (e) => {
e.preventDefault();
const quantity = parseInt(document.getElementById("quantity").value, 10);
// フロント側バリデーション
if (quantity > 2) {
alert("2個までしか購入できません");
return;
}
// APIに送信
Abrir PHP Artisan Tinker
```php
php artisan tinker
```
```
use App\Models\User;
User::create([
'name' => 'test',
'email' => 'test@testuser.com',
'password' => bcrypt('0QcrNCKSQ7uuay2@'),
]);
```
## Exemple d'URL à requêter
https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2025-01.parquet
## Paramètres de `__init__`
BASE_URL = 'https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata'
YEAR = '2025'
DATA_DIR = 🚧 Définir avec path relatif par rapport à la racine du projet
🚧 Il faut éventuellement générer le folder data (dans le `__init__` ou dans un
autre script?)
/**
* @param {number[]} nums
* @return {number}
*/
var maxIncreasingSubarrays = function (nums) {
let maxK = 0; // Stores the maximum valid k found so far
let curLen = 1; // Length of the current strictly increasing run
let prevLen = 0; // Length of the previous strictly increasing run
for (let i = 1; i < nums.length; i++) {
if (nums[i] > nums[i - 1]) {
// Continue the current increasing run
curLen++;
} else {
/
import pandas as pd
from datetime import datetime, timedelta
import yfinance as yf
# Define the end date
end = str(pd.Timestamp.today().strftime('%Y-%m-%d'))
# Calculate the start date (20 years before the end date)
no_years = 20
start = (datetime.strptime(end, '%Y-%m-%d') - timedelta(days=no_years*365)).strftime('%Y-%m-%d')
# Generate the date range
date_range = pd.date_range(start, end, freq='D')
print(date_range, '\n\n')
tickers = ['SPY', 'MDY']
data = yf.download(ticker
Если задача с типом **decomp**

- нужно создать новую задачу на разработку, где производится описание задачи.
- задачу нужно оценить самому и отдать на оценку QA переведя в статус Requirements Review (RR).
QA уже дальше переведет в ready to develop
### Линковки
- Задачу по декомпозиции линкуем children задача для разработки
- Задачу по разработке линкуем с задачей по декомпозу parent
- Задачу
# Setting Up Pre-commit Hooks with UV
Pre-commit hooks automatically check your code before each commit, catching issues early and enforcing consistent code quality.
## Installation
Add pre-commit as a development dependency:
```bash
uv add --dev pre-commit
```
## Configuration
Create `.pre-commit-config.yaml` in your project root:
```yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
# 查看远程仓库
git remote -v
# 断联
git remote remove origin
import cartopy.crs as ccrs
import cartopy.feature as cfeature
from cartopy.io.shapereader import Reader
sys.path.insert(0, "/data8/xuyf/Project/shouxian")
from configs import MAP_DIR
sheng = Reader(os.path.join(MAP_DIR, 'sheng.shp'))
BDY_DIR = "/data8/xuyf/Data/Static/boundary/GS(2024)0650-SHP"
sheng = Reader(os.path.join(BDY_DIR, 'sheng.shp'))
fig = plt.figure(figsize=(12, 8), dpi=300)
ax = fig.subplots(1, 1, subplot_kw={'projection': ccrs.PlateCarree()})
ax.add_feature(cfeatu